﻿import QtQuick 2.9
import QtQuick.Controls 2.5
Item {
    visible: true
    width: 200
    height: 150

    property string changeNofity: Language.changeNofity
    property bool isUpdate: false

    onChangeNofityChanged: {
        isUpdate = !isUpdate
    }

    function trLanguge(v)
    {
        return isUpdate?qsTr(v):qsTr(v)
    }

    Column{
        spacing: 5
        Button{
//            text: isUpdate?qsTr("chinese"):qsTr("chinese")
            text: trLanguge("chinese")
            onClicked: {
                Language.changeLanguage("CN")
            }
        }
        Button{
            text: trLanguge("english")
            onClicked: {
                Language.changeLanguage("EN")
            }
        }

        Text {
            id: name
            text: trLanguge("test")
        }
    }


}
